package top.yangyitao.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import top.yangyitao.entity.AttendanceRecord;

@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class AttendanceRecordDto {
	long id;
	String checkTime;
	UserDto user;
	public AttendanceRecordDto convert(AttendanceRecord attendanceRecord) {
		setId(attendanceRecord.getId());
		setCheckTime(attendanceRecord.getCheckTime());
		setUser(new UserDto().convert(attendanceRecord.getUser()));
		return this;
	}
}
